IF EXISTS (SELECT * FROM sysobjects WHERE name = 'GetParameterIdByParameterCd' AND type IN ('FN','IF','TF'))
     DROP FUNCTION dbo.GetParameterIdByParameterCd
GO

CREATE FUNCTION dbo.GetParameterIdByParameterCd
     ( @ParameterCd varchar(30) )
RETURNS int
AS
/*
 *
 * GetParameterIdByParameterCd
 *
 * Purpose:      
 *
 * Inputs:       
 *
 * Assumes:      
 *
 * Effects:      
 *
 * Returns:      
 *
 * Note(s):      
 *
 * Author(s):    NOVA Concepts Ltd.
 *
 * Change Log:   Initial Release, 05/16/2009, 1.00.0000
 *
 */
BEGIN
     DECLARE @ReturnValue int

     SELECT @ReturnValue = ParameterId
     FROM   dbo.Parameter
     WHERE  ParameterCd = @ParameterCd
     
     RETURN @ReturnValue
END
GO
